
package com.wanmait.recruitment.webController;

import com.wanmait.recruitment.pojo.Carousel;
import com.wanmait.recruitment.service.CarouselService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("zhuang/carousel")
public class CarouselController {
    @Resource
    private CarouselService carouselService;

    @RequestMapping({"list","banner"})
    @ModelAttribute("carousels")
    public List<Carousel> list(){
        return carouselService.findAll();
    }
}

